<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	<script type="text/javascript">
		function Person(name,chinese,math1){
			this.name=name;
			this.chinese=chinese;
			this.math1=math1;
		}
		Person.prototype.getName=function(){
			return this.name;
		}
		Person.prototype.getch=function(){
			return this.chinese;
		}
Person.prototype.getm=function(){
	return this.math1;
}
		function Student(name,chinese,math1,age){

			this.age=age;
			Person.call(this,name,chinese,math1);
		}
		
		Student.prototype=new Person();
		Student.prototype.showage=function(){
			return this.age;
		}
		var st=new Student("沈星星","100分","100分",24);
		document.write("姓名："+st.getName()+"<br />");
		document.write("语文分数:"+st.getch()+"<br />");
		document.write("数学分数:"+st.getm()+"<br />");
		document.write("年纪:"+st.showage()+"<br />");
	</script>
	</body>
</html>
